#include<stdio.h>
#include<string.h>
struct date {
    int nian;
    int yue;
    int day;
};

int days(int nian,int yue,int day){ //计算天数
    int true=nian%4==0 && nian%100!=100||nian%400==0;
    int days1[12]={31,28,31,30,31,30,31,31,30,31,30,31};
    int dates=0;
    for(int i=0;i<yue-1;i++){
        if(true == 1 && i == 1){
            dates+=29;
        }
        else{
            dates+=days1[i];
        }
    }
    return dates+day; 
}


int main(void){
    struct date p;
    printf("请输入年: 月: 日: (用空格隔开)");
    scanf("%d %d %d",&p.nian,&p.yue,&p.day);
    
    int dates=days(p.nian,p.yue,p.day);
    printf("第%d天\n",dates);
	return 0;
}

